<script setup>
  import {ref} from 'vue'

  let flag = ref(true);
  function fun() {
    flag.value = !flag.value
  }
</script>

<template>
  <div>
    <span v-if="flag">ture</span>
    <span v-else>false</span>
    <input type="button" v-on:click="fun()" v-bind:value="'变变变'"/>
    
  </div>
</template>

<style scoped>

</style>
